package cn.wolfcode.p2p.business.service;

import cn.wolfcode.p2p.base.domain.Account;
import cn.wolfcode.p2p.business.domain.Bid;
import cn.wolfcode.p2p.business.domain.BidRequest;
import cn.wolfcode.p2p.business.domain.RechargeOffline;

import java.math.BigDecimal;

public interface IAccountFlowService {
    /**
     * 保存流水
     */
    void createBaseFlow(Account account,BigDecimal amount,String note,Integer actionType);

    /**
     * 线下充值流水
     * @param rechargeOffline
     * @param account
     */
    void createRechargeOfflineSuccessFlow(RechargeOffline rechargeOffline, Account account);

    /**
     * 投标成功产生冻结资金流水
     * @param title
     * @param account
     * @param amount
     */
    void createFreezedSuccessFlow(String title,Account account, BigDecimal amount);

    /**
     * 投标失败流水
     * @param account
     * @param bid
     */
    void createBidFailFlow(Account account,Bid bid);

    /**
     * 借款成功流水
     */
   void createBorrowerSuccessFlow(Account account, BidRequest bidRequest);

    /**
     * 借款成功支付平台管理费流水
     */
    void createPaymentManagementFlow(BigDecimal managementCharge,Account account,String  bidRequestTitle);

    /**
     * 借款成功,冻结资金减少流水
     */
   void  createBorrowerSuccessFreezedFlow(Account account, BigDecimal investmentAmount,String bidRequestTitle);

    /**
     * 还款成功流水
     */

    void createRepaymentSuccessFlow(Account borrowUserAccount, String bidRequestTitle, BigDecimal totalAmount);

    /**
     * 收到投资回报流水
     */
    void createBiddingReturnFlow(Account account,String title,BigDecimal amount);

    /**
     * 支付平台利息管理费
     */
    void createInterestManagerChargeFlow(Account account,String title,BigDecimal amount);

    /**
     * 支付平台滞纳金
     * @param borrowUserAccount 借款人账户
     * @param latePaymentAmount 逾期缴纳的滞纳金
     * @param bidRequestTitle 标题
     * @param monthIndex 那一期逾期
     * @param days 逾期的天数
     */
    void createPayLateFeeFlow(Account borrowUserAccount, BigDecimal latePaymentAmount, String bidRequestTitle,int monthIndex,int days);

    /**
     * 收取滞纳金流水
     */
    void createReceiveLatePaymentAmountFlow(Account account, BigDecimal latePaymentAmount, String bidRequestTitle,int monthIndex,int days);

    /**
     * 收取转让本金流水
     */
    void createReceiveCreditTransferFlow(Account account, BigDecimal amount, String bidRequestTitle,int remainMonthIndex);

    /**
     * 认购成功流水
     */
    void createSubscribeSuccess(Account account, BigDecimal amount, String bidRequestTitle,int remainMonthIndex);

    /**
     * 创建收取体验金利息流水
     */
    void  creatReceivePaymentExperienceInterest(Account account, BigDecimal amount, String bidRequestTitle);
}
